<template>
  <div>
    <h3>API - TEST</h3>
    <el-button @click="getApi">请求</el-button>
  </div>
</template>
<script>

import qs from 'qs'

export default {
  components: {},
  computed: {},
  data() {
    return {}
  },
  methods: {
    getApi() {
      // this.$api.get('/api/rest/articles/1', null, res => {
      //   console.log(res)
      // })
      const params = {
        "id": 123,
        // "createTime": '2020-03-07 13:13:13',
        "author": 'lz',
        "title": 'title',
        "content": '开始 write',
        // article:{
        //   "author": 'lz',
        //   "title": 'title',
        //   "content": '开始 write',
        // }
      }
       this.$api.post('/api/rest/articles',params, res => {
        console.log(res)
      })

    }
  },
}
</script>
<style lang="scss" scoped>

</style>

